package cn.itsource.pet.service.impl;

import cn.itsource.basic.service.impl.BaseServiceImpl;
import cn.itsource.basic.util.PageList;
import cn.itsource.basic.util.RedisService;
import cn.itsource.pet.domain.PetType;
import cn.itsource.pet.mapper.PetTypeMapper;
import cn.itsource.pet.query.PetTypeQuery;
import cn.itsource.pet.service.IPetTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
//Propagation.SUPPORTS:支持别人事务
@Transactional(readOnly = true,propagation = Propagation.SUPPORTS)
public class PetTypeServiceImpl extends BaseServiceImpl<PetType, PetTypeQuery> implements IPetTypeService {

    @Autowired
    private RedisService redisService;

    @Autowired
    private PetTypeMapper petTypeMapper;

    @Override
    public List<PetType> findType() {
        return petTypeMapper.findType();
    }
}
